id: task-211 title: Add version number display to browser UI status: Done assignee: [] created_date: '2025-07-27' updated_date: '2025-08-03 10:28' labels:
- ui
- frontend
- enhancement dependencies: []
Description
Add a subtle version number display to the browser UI for debugging purposes. The version should be displayed on the right side of the Settings item in the sidebar, so it's visible when the sidebar is expanded but hidden when collapsed. The version must come from the same embedded version that the CLI uses (backlog -v), not from package.json.
Acceptance Criteria
- [x] Version number is displayed on the right side of the Settings item in the sidebar
- [x] Version text is small and muted (subtle gray color)
- [x] Version format shows as 'Backlog.md - v{version}' (e.g. Backlog.md - v1.6.2)
- [x] Version is only visible when sidebar is expanded (not shown when collapsed)
- [x] Version number comes from the embedded version in the compiled binary (same as backlog -v)
- [x] Body tag includes version as data attribute for easy inspection
- [x] Version display does not interfere with user experience or UI elements
Implementation Notes
Added version display functionality to the browser UI with the following key components:
Frontend Implementation:
- Created
src/web/utils/version.tsutility that fetches version from/api/versionendpoint - Modified
src/web/App.tsxto set version asdata-versionattribute on body tag (Backlog.md - v{version}) - Updated
src/web/components/SideNavigation.tsxto display version on right side of Settings item when sidebar is expanded
Backend Implementation:
- Added
/api/versionendpoint insrc/server/index.tswithhandleGetVersion()method - Leveraged existing
src/utils/version.tsutility that uses embedded version from compiled binary (same as CLI)
Key Features:
- Version displays as "Backlog.md - v{version}" format with small gray text
- Only visible when sidebar is expanded (hidden when collapsed)
- Uses same embedded version source as CLI (
backlog -v) - Body tag includes
data-versionattribute for debugging/inspection - Graceful error handling with empty fallback if version fetch fails
Files Modified:
src/web/utils/version.ts(new)src/web/App.tsxsrc/web/components/SideNavigation.tsxsrc/server/index.ts